

using com.tc.zigbee.entity;
using com.tc.zigbee.entity.device;
using com.tc.zigbee.mt;
using com.tc.zigbee.zcl;
using com.tc.zigbee.zcl.command;
using com.tc.util;
using com.tc.zigbee.mt.request;
using com.tc.gateway.device.ha;
namespace com.tc.zigbee.entity.device.ha
{
    public class ZigbeeTemperatureSensor : ZigbeeDevice, TemperatureSensor
    {

        public ZigbeeTemperatureSensor(Endpoint endpoint, ZigbeeManager zm)
            : base(endpoint, zm) 
        {

        }


        override public void action()
        {


        }

        public int getTemperature()
        {
            DataValue dv = this.endpoint.getAttribute(ZclConstants.ZCL_CLUSTER_ID_MS_PRESSURE_MEASUREMENT, (short)0x0000);
            if (dv == null)
                return 0;
            return DataUtil.shortValue(dv.value);
        }

    }
}
